/* 全局基础样式 */

:root {
    font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color: #213547;
    background-color: #ffffff;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    display: flex;
}


/* 链接样式 */

a {
    font-weight: 500;
    color: #646cff;
    text-decoration: inherit;
}

a:hover {
    color: #535bf2;
}


/* 顶层容器 */

.app {
    display: flex;
    height: 100vh;
    width: 100%;
    gap: 12px;
    padding: 12px;
    box-sizing: border-box;
}


/* 左边主区域（工具栏 + 画布） */

.left {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* 工具栏 */

.toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

button {
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 0.5em 1em;
    font-size: 0.95em;
    font-weight: 500;
    font-family: inherit;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.25s;
}

button:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

button.active {
    background-color: #1976d2;
    color: white;
    border-color: #1976d2;
}

button.small {
    font-size: 0.85em;
    padding: 0.3em 0.6em;
}


/* Cytoscape 画布 */

.cy {
    flex: 1 1 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    min-height: 600px;
    background-color: #fafafa;
}


/* 右侧属性面板 */

.sidepanel {
    width: 320px;
    border-left: 1px solid #eee;
    padding-left: 12px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidepanel h3,
.sidepanel h4 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.sidepanel ul {
    padding-left: 1.2em;
    margin: 0.5em 0;
    font-size: 0.9em;
    color: #555;
}


/* 输入框样式 */

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}